3.428 \(\int (g+h x)^3 (a+b \log (c (d (e+f x)^p)^q))^2 \, dx\)

Optimal. Leaf size=409 \[ -\frac{2 b h^2 p q (e+f x)^3 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^4}-\frac{b p q (f g-e h)^4 \log (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^4 h}-\frac{2 b p q (e+f x) (f g-e h)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{f^4}-\frac{3 b h p q (e+f x)^2 (f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^4}-\frac{b h^3 p q (e+f x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{8 f^4}+\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}+\frac{2 b^2 h^2 p^2 q^2 (e+f x)^3 (f g-e h)}{9 f^4}+\frac{2 b^2 p^2 q^2 x (f g-e h)^3}{f^3}+\frac{3 b^2 h p^2 q^2 (e+f x)^2 (f g-e h)^2}{4 f^4}+\frac{b^2 p^2 q^2 (f g-e h)^4 \log ^2(e+f x)}{4 f^4 h}+\frac{b^2 h^3 p^2 q^2 (e+f x)^4}{32 f^4} \]

[Out]

(2*b^2*(f*g - e*h)^3*p^2*q^2*x)/f^3 + (3*b^2*h*(f*g - e*h)^2*p^2*q^2*(e + f*x)^2)/(4*f^4) + (2*b^2*h^2*(f*g -
e*h)*p^2*q^2*(e + f*x)^3)/(9*f^4) + (b^2*h^3*p^2*q^2*(e + f*x)^4)/(32*f^4) + (b^2*(f*g - e*h)^4*p^2*q^2*Log[e
+ f*x]^2)/(4*f^4*h) - (2*b*(f*g - e*h)^3*p*q*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q]))/f^4 - (3*b*h*(f*g - e
*h)^2*p*q*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(2*f^4) - (2*b*h^2*(f*g - e*h)*p*q*(e + f*x)^3*(a + b*
Log[c*(d*(e + f*x)^p)^q]))/(3*f^4) - (b*h^3*p*q*(e + f*x)^4*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(8*f^4) - (b*(f*
g - e*h)^4*p*q*Log[e + f*x]*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(2*f^4*h) + ((g + h*x)^4*(a + b*Log[c*(d*(e + f*
x)^p)^q])^2)/(4*h)

________________________________________________________________________________________

Rubi [A]  time = 1.03769, antiderivative size = 325, normalized size of antiderivative = 0.79, number of steps used = 7, number of rules used = 7, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2398, 2411, 43, 2334, 12, 2301, 2445} \[ -\frac{b p q \left (\frac{36 h^2 (e+f x)^2 (f g-e h)^2}{f^4}+\frac{16 h^3 (e+f x)^3 (f g-e h)}{f^4}+\frac{48 h (e+f x) (f g-e h)^3}{f^4}+\frac{12 (f g-e h)^4 \log (e+f x)}{f^4}+\frac{3 h^4 (e+f x)^4}{f^4}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{24 h}+\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}+\frac{2 b^2 h^2 p^2 q^2 (e+f x)^3 (f g-e h)}{9 f^4}+\frac{2 b^2 p^2 q^2 x (f g-e h)^3}{f^3}+\frac{3 b^2 h p^2 q^2 (e+f x)^2 (f g-e h)^2}{4 f^4}+\frac{b^2 p^2 q^2 (f g-e h)^4 \log ^2(e+f x)}{4 f^4 h}+\frac{b^2 h^3 p^2 q^2 (e+f x)^4}{32 f^4} \]

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]

[Out]

(2*b^2*(f*g - e*h)^3*p^2*q^2*x)/f^3 + (3*b^2*h*(f*g - e*h)^2*p^2*q^2*(e + f*x)^2)/(4*f^4) + (2*b^2*h^2*(f*g -
e*h)*p^2*q^2*(e + f*x)^3)/(9*f^4) + (b^2*h^3*p^2*q^2*(e + f*x)^4)/(32*f^4) + (b^2*(f*g - e*h)^4*p^2*q^2*Log[e
+ f*x]^2)/(4*f^4*h) - (b*p*q*((48*h*(f*g - e*h)^3*(e + f*x))/f^4 + (36*h^2*(f*g - e*h)^2*(e + f*x)^2)/f^4 + (1
6*h^3*(f*g - e*h)*(e + f*x)^3)/f^4 + (3*h^4*(e + f*x)^4)/f^4 + (12*(f*g - e*h)^4*Log[e + f*x])/f^4)*(a + b*Log
[c*(d*(e + f*x)^p)^q]))/(24*h) + ((g + h*x)^4*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/(4*h)

Rule 2398

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((
f + g*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*(q + 1)), x] - Dist[(b*e*n*p)/(g*(q + 1)), Int[((f + g*x)^(q
 + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2445

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin{align*} \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \, dx &=\operatorname{Subst}\left (\int (g+h x)^3 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2 \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}-\operatorname{Subst}\left (\frac{(b f p q) \int \frac{(g+h x)^4 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}{e+f x} \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}-\operatorname{Subst}\left (\frac{(b p q) \operatorname{Subst}\left (\int \frac{\left (\frac{f g-e h}{f}+\frac{h x}{f}\right )^4 \left (a+b \log \left (c d^q x^{p q}\right )\right )}{x} \, dx,x,e+f x\right )}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{b p q \left (\frac{48 h (f g-e h)^3 (e+f x)}{f^4}+\frac{36 h^2 (f g-e h)^2 (e+f x)^2}{f^4}+\frac{16 h^3 (f g-e h) (e+f x)^3}{f^4}+\frac{3 h^4 (e+f x)^4}{f^4}+\frac{12 (f g-e h)^4 \log (e+f x)}{f^4}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{24 h}+\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}+\operatorname{Subst}\left (\frac{\left (b^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{48 h (f g-e h)^3+36 h^2 (f g-e h)^2 x+16 h^3 (f g-e h) x^2+3 h^4 x^3+\frac{12 (f g-e h)^4 \log (x)}{x}}{12 f^4} \, dx,x,e+f x\right )}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{b p q \left (\frac{48 h (f g-e h)^3 (e+f x)}{f^4}+\frac{36 h^2 (f g-e h)^2 (e+f x)^2}{f^4}+\frac{16 h^3 (f g-e h) (e+f x)^3}{f^4}+\frac{3 h^4 (e+f x)^4}{f^4}+\frac{12 (f g-e h)^4 \log (e+f x)}{f^4}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{24 h}+\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}+\operatorname{Subst}\left (\frac{\left (b^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \left (48 h (f g-e h)^3+36 h^2 (f g-e h)^2 x+16 h^3 (f g-e h) x^2+3 h^4 x^3+\frac{12 (f g-e h)^4 \log (x)}{x}\right ) \, dx,x,e+f x\right )}{24 f^4 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{2 b^2 (f g-e h)^3 p^2 q^2 x}{f^3}+\frac{3 b^2 h (f g-e h)^2 p^2 q^2 (e+f x)^2}{4 f^4}+\frac{2 b^2 h^2 (f g-e h) p^2 q^2 (e+f x)^3}{9 f^4}+\frac{b^2 h^3 p^2 q^2 (e+f x)^4}{32 f^4}-\frac{b p q \left (\frac{48 h (f g-e h)^3 (e+f x)}{f^4}+\frac{36 h^2 (f g-e h)^2 (e+f x)^2}{f^4}+\frac{16 h^3 (f g-e h) (e+f x)^3}{f^4}+\frac{3 h^4 (e+f x)^4}{f^4}+\frac{12 (f g-e h)^4 \log (e+f x)}{f^4}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{24 h}+\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}+\operatorname{Subst}\left (\frac{\left (b^2 (f g-e h)^4 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,e+f x\right )}{2 f^4 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{2 b^2 (f g-e h)^3 p^2 q^2 x}{f^3}+\frac{3 b^2 h (f g-e h)^2 p^2 q^2 (e+f x)^2}{4 f^4}+\frac{2 b^2 h^2 (f g-e h) p^2 q^2 (e+f x)^3}{9 f^4}+\frac{b^2 h^3 p^2 q^2 (e+f x)^4}{32 f^4}+\frac{b^2 (f g-e h)^4 p^2 q^2 \log ^2(e+f x)}{4 f^4 h}-\frac{b p q \left (\frac{48 h (f g-e h)^3 (e+f x)}{f^4}+\frac{36 h^2 (f g-e h)^2 (e+f x)^2}{f^4}+\frac{16 h^3 (f g-e h) (e+f x)^3}{f^4}+\frac{3 h^4 (e+f x)^4}{f^4}+\frac{12 (f g-e h)^4 \log (e+f x)}{f^4}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{24 h}+\frac{(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{4 h}\\ \end{align*}

Mathematica [A]  time = 0.269298, size = 400, normalized size = 0.98 \[ \frac{64 b h^2 p q (f g-e h) \left (b f p q x \left (3 e^2+3 e f x+f^2 x^2\right )-3 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )+9 b h^3 p q \left (b f p q x \left (6 e^2 f x+4 e^3+4 e f^2 x^2+f^3 x^3\right )-4 (e+f x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )+288 h^2 (e+f x)^3 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+432 h (e+f x)^2 (f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+288 (e+f x) (f g-e h)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2-576 b p q (f g-e h)^3 \left (f x (a-b p q)+b (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )\right )+216 b h p q (f g-e h)^2 \left (b f p q x (2 e+f x)-2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )+72 h^3 (e+f x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{288 f^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(g + h*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]

[Out]

(288*(f*g - e*h)^3*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2 + 432*h*(f*g - e*h)^2*(e + f*x)^2*(a + b*Log[c
*(d*(e + f*x)^p)^q])^2 + 288*h^2*(f*g - e*h)*(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q])^2 + 72*h^3*(e + f*x)
^4*(a + b*Log[c*(d*(e + f*x)^p)^q])^2 - 576*b*(f*g - e*h)^3*p*q*(f*(a - b*p*q)*x + b*(e + f*x)*Log[c*(d*(e + f
*x)^p)^q]) + 216*b*h*(f*g - e*h)^2*p*q*(b*f*p*q*x*(2*e + f*x) - 2*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])
) + 64*b*h^2*(f*g - e*h)*p*q*(b*f*p*q*x*(3*e^2 + 3*e*f*x + f^2*x^2) - 3*(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^
p)^q])) + 9*b*h^3*p*q*(b*f*p*q*x*(4*e^3 + 6*e^2*f*x + 4*e*f^2*x^2 + f^3*x^3) - 4*(e + f*x)^4*(a + b*Log[c*(d*(
e + f*x)^p)^q])))/(288*f^4)

________________________________________________________________________________________

Maple [F]  time = 0.499, size = 0, normalized size = 0. \begin{align*} \int \left ( hx+g \right ) ^{3} \left ( a+b\ln \left ( c \left ( d \left ( fx+e \right ) ^{p} \right ) ^{q} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^3*(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)

[Out]

int((h*x+g)^3*(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)

________________________________________________________________________________________

Maxima [B]  time = 1.31452, size = 1208, normalized size = 2.95 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="maxima")

[Out]

1/4*b^2*h^3*x^4*log(((f*x + e)^p*d)^q*c)^2 + 1/2*a*b*h^3*x^4*log(((f*x + e)^p*d)^q*c) + b^2*g*h^2*x^3*log(((f*
x + e)^p*d)^q*c)^2 + 1/4*a^2*h^3*x^4 - 2*a*b*f*g^3*p*q*(x/f - e*log(f*x + e)/f^2) - 1/24*a*b*f*h^3*p*q*(12*e^4
*log(f*x + e)/f^5 + (3*f^3*x^4 - 4*e*f^2*x^3 + 6*e^2*f*x^2 - 12*e^3*x)/f^4) + 1/3*a*b*f*g*h^2*p*q*(6*e^3*log(f
*x + e)/f^4 - (2*f^2*x^3 - 3*e*f*x^2 + 6*e^2*x)/f^3) - 3/2*a*b*f*g^2*h*p*q*(2*e^2*log(f*x + e)/f^3 + (f*x^2 -
2*e*x)/f^2) + 2*a*b*g*h^2*x^3*log(((f*x + e)^p*d)^q*c) + 3/2*b^2*g^2*h*x^2*log(((f*x + e)^p*d)^q*c)^2 + a^2*g*
h^2*x^3 + 3*a*b*g^2*h*x^2*log(((f*x + e)^p*d)^q*c) + b^2*g^3*x*log(((f*x + e)^p*d)^q*c)^2 + 3/2*a^2*g^2*h*x^2
+ 2*a*b*g^3*x*log(((f*x + e)^p*d)^q*c) - (2*f*p*q*(x/f - e*log(f*x + e)/f^2)*log(((f*x + e)^p*d)^q*c) + (e*log
(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p^2*q^2/f)*b^2*g^3 - 3/4*(2*f*p*q*(2*e^2*log(f*x + e)/f^3 + (f*x^2 - 2
*e*x)/f^2)*log(((f*x + e)^p*d)^q*c) - (f^2*x^2 + 2*e^2*log(f*x + e)^2 - 6*e*f*x + 6*e^2*log(f*x + e))*p^2*q^2/
f^2)*b^2*g^2*h + 1/18*(6*f*p*q*(6*e^3*log(f*x + e)/f^4 - (2*f^2*x^3 - 3*e*f*x^2 + 6*e^2*x)/f^3)*log(((f*x + e)
^p*d)^q*c) + (4*f^3*x^3 - 15*e*f^2*x^2 - 18*e^3*log(f*x + e)^2 + 66*e^2*f*x - 66*e^3*log(f*x + e))*p^2*q^2/f^3
)*b^2*g*h^2 - 1/288*(12*f*p*q*(12*e^4*log(f*x + e)/f^5 + (3*f^3*x^4 - 4*e*f^2*x^3 + 6*e^2*f*x^2 - 12*e^3*x)/f^
4)*log(((f*x + e)^p*d)^q*c) - (9*f^4*x^4 - 28*e*f^3*x^3 + 78*e^2*f^2*x^2 + 72*e^4*log(f*x + e)^2 - 300*e^3*f*x
 + 300*e^4*log(f*x + e))*p^2*q^2/f^4)*b^2*h^3 + a^2*g^3*x

________________________________________________________________________________________

Fricas [B]  time = 2.74883, size = 3548, normalized size = 8.67 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="fricas")

[Out]

1/288*(9*(b^2*f^4*h^3*p^2*q^2 - 4*a*b*f^4*h^3*p*q + 8*a^2*f^4*h^3)*x^4 + 4*(72*a^2*f^4*g*h^2 + (16*b^2*f^4*g*h
^2 - 7*b^2*e*f^3*h^3)*p^2*q^2 - 12*(4*a*b*f^4*g*h^2 - a*b*e*f^3*h^3)*p*q)*x^3 + 6*(72*a^2*f^4*g^2*h + (36*b^2*
f^4*g^2*h - 40*b^2*e*f^3*g*h^2 + 13*b^2*e^2*f^2*h^3)*p^2*q^2 - 12*(6*a*b*f^4*g^2*h - 4*a*b*e*f^3*g*h^2 + a*b*e
^2*f^2*h^3)*p*q)*x^2 + 72*(b^2*f^4*h^3*p^2*q^2*x^4 + 4*b^2*f^4*g*h^2*p^2*q^2*x^3 + 6*b^2*f^4*g^2*h*p^2*q^2*x^2
 + 4*b^2*f^4*g^3*p^2*q^2*x + (4*b^2*e*f^3*g^3 - 6*b^2*e^2*f^2*g^2*h + 4*b^2*e^3*f*g*h^2 - b^2*e^4*h^3)*p^2*q^2
)*log(f*x + e)^2 + 72*(b^2*f^4*h^3*x^4 + 4*b^2*f^4*g*h^2*x^3 + 6*b^2*f^4*g^2*h*x^2 + 4*b^2*f^4*g^3*x)*log(c)^2
 + 72*(b^2*f^4*h^3*q^2*x^4 + 4*b^2*f^4*g*h^2*q^2*x^3 + 6*b^2*f^4*g^2*h*q^2*x^2 + 4*b^2*f^4*g^3*q^2*x)*log(d)^2
 + 12*(24*a^2*f^4*g^3 + (48*b^2*f^4*g^3 - 108*b^2*e*f^3*g^2*h + 88*b^2*e^2*f^2*g*h^2 - 25*b^2*e^3*f*h^3)*p^2*q
^2 - 12*(4*a*b*f^4*g^3 - 6*a*b*e*f^3*g^2*h + 4*a*b*e^2*f^2*g*h^2 - a*b*e^3*f*h^3)*p*q)*x - 12*((48*b^2*e*f^3*g
^3 - 108*b^2*e^2*f^2*g^2*h + 88*b^2*e^3*f*g*h^2 - 25*b^2*e^4*h^3)*p^2*q^2 + 3*(b^2*f^4*h^3*p^2*q^2 - 4*a*b*f^4
*h^3*p*q)*x^4 - 4*(12*a*b*f^4*g*h^2*p*q - (4*b^2*f^4*g*h^2 - b^2*e*f^3*h^3)*p^2*q^2)*x^3 - 12*(4*a*b*e*f^3*g^3
 - 6*a*b*e^2*f^2*g^2*h + 4*a*b*e^3*f*g*h^2 - a*b*e^4*h^3)*p*q - 6*(12*a*b*f^4*g^2*h*p*q - (6*b^2*f^4*g^2*h - 4
*b^2*e*f^3*g*h^2 + b^2*e^2*f^2*h^3)*p^2*q^2)*x^2 - 12*(4*a*b*f^4*g^3*p*q - (4*b^2*f^4*g^3 - 6*b^2*e*f^3*g^2*h
+ 4*b^2*e^2*f^2*g*h^2 - b^2*e^3*f*h^3)*p^2*q^2)*x - 12*(b^2*f^4*h^3*p*q*x^4 + 4*b^2*f^4*g*h^2*p*q*x^3 + 6*b^2*
f^4*g^2*h*p*q*x^2 + 4*b^2*f^4*g^3*p*q*x + (4*b^2*e*f^3*g^3 - 6*b^2*e^2*f^2*g^2*h + 4*b^2*e^3*f*g*h^2 - b^2*e^4
*h^3)*p*q)*log(c) - 12*(b^2*f^4*h^3*p*q^2*x^4 + 4*b^2*f^4*g*h^2*p*q^2*x^3 + 6*b^2*f^4*g^2*h*p*q^2*x^2 + 4*b^2*
f^4*g^3*p*q^2*x + (4*b^2*e*f^3*g^3 - 6*b^2*e^2*f^2*g^2*h + 4*b^2*e^3*f*g*h^2 - b^2*e^4*h^3)*p*q^2)*log(d))*log
(f*x + e) - 12*(3*(b^2*f^4*h^3*p*q - 4*a*b*f^4*h^3)*x^4 - 4*(12*a*b*f^4*g*h^2 - (4*b^2*f^4*g*h^2 - b^2*e*f^3*h
^3)*p*q)*x^3 - 6*(12*a*b*f^4*g^2*h - (6*b^2*f^4*g^2*h - 4*b^2*e*f^3*g*h^2 + b^2*e^2*f^2*h^3)*p*q)*x^2 - 12*(4*
a*b*f^4*g^3 - (4*b^2*f^4*g^3 - 6*b^2*e*f^3*g^2*h + 4*b^2*e^2*f^2*g*h^2 - b^2*e^3*f*h^3)*p*q)*x)*log(c) - 12*(3
*(b^2*f^4*h^3*p*q^2 - 4*a*b*f^4*h^3*q)*x^4 - 4*(12*a*b*f^4*g*h^2*q - (4*b^2*f^4*g*h^2 - b^2*e*f^3*h^3)*p*q^2)*
x^3 - 6*(12*a*b*f^4*g^2*h*q - (6*b^2*f^4*g^2*h - 4*b^2*e*f^3*g*h^2 + b^2*e^2*f^2*h^3)*p*q^2)*x^2 - 12*(4*a*b*f
^4*g^3*q - (4*b^2*f^4*g^3 - 6*b^2*e*f^3*g^2*h + 4*b^2*e^2*f^2*g*h^2 - b^2*e^3*f*h^3)*p*q^2)*x - 12*(b^2*f^4*h^
3*q*x^4 + 4*b^2*f^4*g*h^2*q*x^3 + 6*b^2*f^4*g^2*h*q*x^2 + 4*b^2*f^4*g^3*q*x)*log(c))*log(d))/f^4

________________________________________________________________________________________

Sympy [A]  time = 116.264, size = 2623, normalized size = 6.41 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**3*(a+b*ln(c*(d*(f*x+e)**p)**q))**2,x)

[Out]

Piecewise((a**2*g**3*x + 3*a**2*g**2*h*x**2/2 + a**2*g*h**2*x**3 + a**2*h**3*x**4/4 - a*b*e**4*h**3*p*q*log(e
+ f*x)/(2*f**4) + 2*a*b*e**3*g*h**2*p*q*log(e + f*x)/f**3 + a*b*e**3*h**3*p*q*x/(2*f**3) - 3*a*b*e**2*g**2*h*p
*q*log(e + f*x)/f**2 - 2*a*b*e**2*g*h**2*p*q*x/f**2 - a*b*e**2*h**3*p*q*x**2/(4*f**2) + 2*a*b*e*g**3*p*q*log(e
 + f*x)/f + 3*a*b*e*g**2*h*p*q*x/f + a*b*e*g*h**2*p*q*x**2/f + a*b*e*h**3*p*q*x**3/(6*f) + 2*a*b*g**3*p*q*x*lo
g(e + f*x) - 2*a*b*g**3*p*q*x + 2*a*b*g**3*q*x*log(d) + 2*a*b*g**3*x*log(c) + 3*a*b*g**2*h*p*q*x**2*log(e + f*
x) - 3*a*b*g**2*h*p*q*x**2/2 + 3*a*b*g**2*h*q*x**2*log(d) + 3*a*b*g**2*h*x**2*log(c) + 2*a*b*g*h**2*p*q*x**3*l
og(e + f*x) - 2*a*b*g*h**2*p*q*x**3/3 + 2*a*b*g*h**2*q*x**3*log(d) + 2*a*b*g*h**2*x**3*log(c) + a*b*h**3*p*q*x
**4*log(e + f*x)/2 - a*b*h**3*p*q*x**4/8 + a*b*h**3*q*x**4*log(d)/2 + a*b*h**3*x**4*log(c)/2 - b**2*e**4*h**3*
p**2*q**2*log(e + f*x)**2/(4*f**4) + 25*b**2*e**4*h**3*p**2*q**2*log(e + f*x)/(24*f**4) - b**2*e**4*h**3*p*q**
2*log(d)*log(e + f*x)/(2*f**4) - b**2*e**4*h**3*p*q*log(c)*log(e + f*x)/(2*f**4) + b**2*e**3*g*h**2*p**2*q**2*
log(e + f*x)**2/f**3 - 11*b**2*e**3*g*h**2*p**2*q**2*log(e + f*x)/(3*f**3) + 2*b**2*e**3*g*h**2*p*q**2*log(d)*
log(e + f*x)/f**3 + 2*b**2*e**3*g*h**2*p*q*log(c)*log(e + f*x)/f**3 + b**2*e**3*h**3*p**2*q**2*x*log(e + f*x)/
(2*f**3) - 25*b**2*e**3*h**3*p**2*q**2*x/(24*f**3) + b**2*e**3*h**3*p*q**2*x*log(d)/(2*f**3) + b**2*e**3*h**3*
p*q*x*log(c)/(2*f**3) - 3*b**2*e**2*g**2*h*p**2*q**2*log(e + f*x)**2/(2*f**2) + 9*b**2*e**2*g**2*h*p**2*q**2*l
og(e + f*x)/(2*f**2) - 3*b**2*e**2*g**2*h*p*q**2*log(d)*log(e + f*x)/f**2 - 3*b**2*e**2*g**2*h*p*q*log(c)*log(
e + f*x)/f**2 - 2*b**2*e**2*g*h**2*p**2*q**2*x*log(e + f*x)/f**2 + 11*b**2*e**2*g*h**2*p**2*q**2*x/(3*f**2) -
2*b**2*e**2*g*h**2*p*q**2*x*log(d)/f**2 - 2*b**2*e**2*g*h**2*p*q*x*log(c)/f**2 - b**2*e**2*h**3*p**2*q**2*x**2
*log(e + f*x)/(4*f**2) + 13*b**2*e**2*h**3*p**2*q**2*x**2/(48*f**2) - b**2*e**2*h**3*p*q**2*x**2*log(d)/(4*f**
2) - b**2*e**2*h**3*p*q*x**2*log(c)/(4*f**2) + b**2*e*g**3*p**2*q**2*log(e + f*x)**2/f - 2*b**2*e*g**3*p**2*q*
*2*log(e + f*x)/f + 2*b**2*e*g**3*p*q**2*log(d)*log(e + f*x)/f + 2*b**2*e*g**3*p*q*log(c)*log(e + f*x)/f + 3*b
**2*e*g**2*h*p**2*q**2*x*log(e + f*x)/f - 9*b**2*e*g**2*h*p**2*q**2*x/(2*f) + 3*b**2*e*g**2*h*p*q**2*x*log(d)/
f + 3*b**2*e*g**2*h*p*q*x*log(c)/f + b**2*e*g*h**2*p**2*q**2*x**2*log(e + f*x)/f - 5*b**2*e*g*h**2*p**2*q**2*x
**2/(6*f) + b**2*e*g*h**2*p*q**2*x**2*log(d)/f + b**2*e*g*h**2*p*q*x**2*log(c)/f + b**2*e*h**3*p**2*q**2*x**3*
log(e + f*x)/(6*f) - 7*b**2*e*h**3*p**2*q**2*x**3/(72*f) + b**2*e*h**3*p*q**2*x**3*log(d)/(6*f) + b**2*e*h**3*
p*q*x**3*log(c)/(6*f) + b**2*g**3*p**2*q**2*x*log(e + f*x)**2 - 2*b**2*g**3*p**2*q**2*x*log(e + f*x) + 2*b**2*
g**3*p**2*q**2*x + 2*b**2*g**3*p*q**2*x*log(d)*log(e + f*x) - 2*b**2*g**3*p*q**2*x*log(d) + 2*b**2*g**3*p*q*x*
log(c)*log(e + f*x) - 2*b**2*g**3*p*q*x*log(c) + b**2*g**3*q**2*x*log(d)**2 + 2*b**2*g**3*q*x*log(c)*log(d) +
b**2*g**3*x*log(c)**2 + 3*b**2*g**2*h*p**2*q**2*x**2*log(e + f*x)**2/2 - 3*b**2*g**2*h*p**2*q**2*x**2*log(e +
f*x)/2 + 3*b**2*g**2*h*p**2*q**2*x**2/4 + 3*b**2*g**2*h*p*q**2*x**2*log(d)*log(e + f*x) - 3*b**2*g**2*h*p*q**2
*x**2*log(d)/2 + 3*b**2*g**2*h*p*q*x**2*log(c)*log(e + f*x) - 3*b**2*g**2*h*p*q*x**2*log(c)/2 + 3*b**2*g**2*h*
q**2*x**2*log(d)**2/2 + 3*b**2*g**2*h*q*x**2*log(c)*log(d) + 3*b**2*g**2*h*x**2*log(c)**2/2 + b**2*g*h**2*p**2
*q**2*x**3*log(e + f*x)**2 - 2*b**2*g*h**2*p**2*q**2*x**3*log(e + f*x)/3 + 2*b**2*g*h**2*p**2*q**2*x**3/9 + 2*
b**2*g*h**2*p*q**2*x**3*log(d)*log(e + f*x) - 2*b**2*g*h**2*p*q**2*x**3*log(d)/3 + 2*b**2*g*h**2*p*q*x**3*log(
c)*log(e + f*x) - 2*b**2*g*h**2*p*q*x**3*log(c)/3 + b**2*g*h**2*q**2*x**3*log(d)**2 + 2*b**2*g*h**2*q*x**3*log
(c)*log(d) + b**2*g*h**2*x**3*log(c)**2 + b**2*h**3*p**2*q**2*x**4*log(e + f*x)**2/4 - b**2*h**3*p**2*q**2*x**
4*log(e + f*x)/8 + b**2*h**3*p**2*q**2*x**4/32 + b**2*h**3*p*q**2*x**4*log(d)*log(e + f*x)/2 - b**2*h**3*p*q**
2*x**4*log(d)/8 + b**2*h**3*p*q*x**4*log(c)*log(e + f*x)/2 - b**2*h**3*p*q*x**4*log(c)/8 + b**2*h**3*q**2*x**4
*log(d)**2/4 + b**2*h**3*q*x**4*log(c)*log(d)/2 + b**2*h**3*x**4*log(c)**2/4, Ne(f, 0)), ((a + b*log(c*(d*e**p
)**q))**2*(g**3*x + 3*g**2*h*x**2/2 + g*h**2*x**3 + h**3*x**4/4), True))

________________________________________________________________________________________

Giac [B]  time = 1.5131, size = 5316, normalized size = 13. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="giac")

[Out]

(f*x + e)*b^2*g^3*p^2*q^2*log(f*x + e)^2/f + 3/2*(f*x + e)^2*b^2*g^2*h*p^2*q^2*log(f*x + e)^2/f^2 + (f*x + e)^
3*b^2*g*h^2*p^2*q^2*log(f*x + e)^2/f^3 + 1/4*(f*x + e)^4*b^2*h^3*p^2*q^2*log(f*x + e)^2/f^4 - 3*(f*x + e)*b^2*
g^2*h*p^2*q^2*e*log(f*x + e)^2/f^2 - 3*(f*x + e)^2*b^2*g*h^2*p^2*q^2*e*log(f*x + e)^2/f^3 - (f*x + e)^3*b^2*h^
3*p^2*q^2*e*log(f*x + e)^2/f^4 - 2*(f*x + e)*b^2*g^3*p^2*q^2*log(f*x + e)/f - 3/2*(f*x + e)^2*b^2*g^2*h*p^2*q^
2*log(f*x + e)/f^2 - 2/3*(f*x + e)^3*b^2*g*h^2*p^2*q^2*log(f*x + e)/f^3 - 1/8*(f*x + e)^4*b^2*h^3*p^2*q^2*log(
f*x + e)/f^4 + 6*(f*x + e)*b^2*g^2*h*p^2*q^2*e*log(f*x + e)/f^2 + 3*(f*x + e)^2*b^2*g*h^2*p^2*q^2*e*log(f*x +
e)/f^3 + 2/3*(f*x + e)^3*b^2*h^3*p^2*q^2*e*log(f*x + e)/f^4 + 3*(f*x + e)*b^2*g*h^2*p^2*q^2*e^2*log(f*x + e)^2
/f^3 + 3/2*(f*x + e)^2*b^2*h^3*p^2*q^2*e^2*log(f*x + e)^2/f^4 + 2*(f*x + e)*b^2*g^3*p*q^2*log(f*x + e)*log(d)/
f + 3*(f*x + e)^2*b^2*g^2*h*p*q^2*log(f*x + e)*log(d)/f^2 + 2*(f*x + e)^3*b^2*g*h^2*p*q^2*log(f*x + e)*log(d)/
f^3 + 1/2*(f*x + e)^4*b^2*h^3*p*q^2*log(f*x + e)*log(d)/f^4 - 6*(f*x + e)*b^2*g^2*h*p*q^2*e*log(f*x + e)*log(d
)/f^2 - 6*(f*x + e)^2*b^2*g*h^2*p*q^2*e*log(f*x + e)*log(d)/f^3 - 2*(f*x + e)^3*b^2*h^3*p*q^2*e*log(f*x + e)*l
og(d)/f^4 + 2*(f*x + e)*b^2*g^3*p^2*q^2/f + 3/4*(f*x + e)^2*b^2*g^2*h*p^2*q^2/f^2 + 2/9*(f*x + e)^3*b^2*g*h^2*
p^2*q^2/f^3 + 1/32*(f*x + e)^4*b^2*h^3*p^2*q^2/f^4 - 6*(f*x + e)*b^2*g^2*h*p^2*q^2*e/f^2 - 3/2*(f*x + e)^2*b^2
*g*h^2*p^2*q^2*e/f^3 - 2/9*(f*x + e)^3*b^2*h^3*p^2*q^2*e/f^4 - 6*(f*x + e)*b^2*g*h^2*p^2*q^2*e^2*log(f*x + e)/
f^3 - 3/2*(f*x + e)^2*b^2*h^3*p^2*q^2*e^2*log(f*x + e)/f^4 - (f*x + e)*b^2*h^3*p^2*q^2*e^3*log(f*x + e)^2/f^4
+ 2*(f*x + e)*b^2*g^3*p*q*log(f*x + e)*log(c)/f + 3*(f*x + e)^2*b^2*g^2*h*p*q*log(f*x + e)*log(c)/f^2 + 2*(f*x
 + e)^3*b^2*g*h^2*p*q*log(f*x + e)*log(c)/f^3 + 1/2*(f*x + e)^4*b^2*h^3*p*q*log(f*x + e)*log(c)/f^4 - 6*(f*x +
 e)*b^2*g^2*h*p*q*e*log(f*x + e)*log(c)/f^2 - 6*(f*x + e)^2*b^2*g*h^2*p*q*e*log(f*x + e)*log(c)/f^3 - 2*(f*x +
 e)^3*b^2*h^3*p*q*e*log(f*x + e)*log(c)/f^4 - 2*(f*x + e)*b^2*g^3*p*q^2*log(d)/f - 3/2*(f*x + e)^2*b^2*g^2*h*p
*q^2*log(d)/f^2 - 2/3*(f*x + e)^3*b^2*g*h^2*p*q^2*log(d)/f^3 - 1/8*(f*x + e)^4*b^2*h^3*p*q^2*log(d)/f^4 + 6*(f
*x + e)*b^2*g^2*h*p*q^2*e*log(d)/f^2 + 3*(f*x + e)^2*b^2*g*h^2*p*q^2*e*log(d)/f^3 + 2/3*(f*x + e)^3*b^2*h^3*p*
q^2*e*log(d)/f^4 + 6*(f*x + e)*b^2*g*h^2*p*q^2*e^2*log(f*x + e)*log(d)/f^3 + 3*(f*x + e)^2*b^2*h^3*p*q^2*e^2*l
og(f*x + e)*log(d)/f^4 + (f*x + e)*b^2*g^3*q^2*log(d)^2/f + 3/2*(f*x + e)^2*b^2*g^2*h*q^2*log(d)^2/f^2 + (f*x
+ e)^3*b^2*g*h^2*q^2*log(d)^2/f^3 + 1/4*(f*x + e)^4*b^2*h^3*q^2*log(d)^2/f^4 - 3*(f*x + e)*b^2*g^2*h*q^2*e*log
(d)^2/f^2 - 3*(f*x + e)^2*b^2*g*h^2*q^2*e*log(d)^2/f^3 - (f*x + e)^3*b^2*h^3*q^2*e*log(d)^2/f^4 + 6*(f*x + e)*
b^2*g*h^2*p^2*q^2*e^2/f^3 + 3/4*(f*x + e)^2*b^2*h^3*p^2*q^2*e^2/f^4 + 2*(f*x + e)*a*b*g^3*p*q*log(f*x + e)/f +
 3*(f*x + e)^2*a*b*g^2*h*p*q*log(f*x + e)/f^2 + 2*(f*x + e)^3*a*b*g*h^2*p*q*log(f*x + e)/f^3 + 1/2*(f*x + e)^4
*a*b*h^3*p*q*log(f*x + e)/f^4 + 2*(f*x + e)*b^2*h^3*p^2*q^2*e^3*log(f*x + e)/f^4 - 6*(f*x + e)*a*b*g^2*h*p*q*e
*log(f*x + e)/f^2 - 6*(f*x + e)^2*a*b*g*h^2*p*q*e*log(f*x + e)/f^3 - 2*(f*x + e)^3*a*b*h^3*p*q*e*log(f*x + e)/
f^4 - 2*(f*x + e)*b^2*g^3*p*q*log(c)/f - 3/2*(f*x + e)^2*b^2*g^2*h*p*q*log(c)/f^2 - 2/3*(f*x + e)^3*b^2*g*h^2*
p*q*log(c)/f^3 - 1/8*(f*x + e)^4*b^2*h^3*p*q*log(c)/f^4 + 6*(f*x + e)*b^2*g^2*h*p*q*e*log(c)/f^2 + 3*(f*x + e)
^2*b^2*g*h^2*p*q*e*log(c)/f^3 + 2/3*(f*x + e)^3*b^2*h^3*p*q*e*log(c)/f^4 + 6*(f*x + e)*b^2*g*h^2*p*q*e^2*log(f
*x + e)*log(c)/f^3 + 3*(f*x + e)^2*b^2*h^3*p*q*e^2*log(f*x + e)*log(c)/f^4 - 6*(f*x + e)*b^2*g*h^2*p*q^2*e^2*l
og(d)/f^3 - 3/2*(f*x + e)^2*b^2*h^3*p*q^2*e^2*log(d)/f^4 - 2*(f*x + e)*b^2*h^3*p*q^2*e^3*log(f*x + e)*log(d)/f
^4 + 2*(f*x + e)*b^2*g^3*q*log(c)*log(d)/f + 3*(f*x + e)^2*b^2*g^2*h*q*log(c)*log(d)/f^2 + 2*(f*x + e)^3*b^2*g
*h^2*q*log(c)*log(d)/f^3 + 1/2*(f*x + e)^4*b^2*h^3*q*log(c)*log(d)/f^4 - 6*(f*x + e)*b^2*g^2*h*q*e*log(c)*log(
d)/f^2 - 6*(f*x + e)^2*b^2*g*h^2*q*e*log(c)*log(d)/f^3 - 2*(f*x + e)^3*b^2*h^3*q*e*log(c)*log(d)/f^4 + 3*(f*x
+ e)*b^2*g*h^2*q^2*e^2*log(d)^2/f^3 + 3/2*(f*x + e)^2*b^2*h^3*q^2*e^2*log(d)^2/f^4 - 2*(f*x + e)*a*b*g^3*p*q/f
 - 3/2*(f*x + e)^2*a*b*g^2*h*p*q/f^2 - 2/3*(f*x + e)^3*a*b*g*h^2*p*q/f^3 - 1/8*(f*x + e)^4*a*b*h^3*p*q/f^4 - 2
*(f*x + e)*b^2*h^3*p^2*q^2*e^3/f^4 + 6*(f*x + e)*a*b*g^2*h*p*q*e/f^2 + 3*(f*x + e)^2*a*b*g*h^2*p*q*e/f^3 + 2/3
*(f*x + e)^3*a*b*h^3*p*q*e/f^4 + 6*(f*x + e)*a*b*g*h^2*p*q*e^2*log(f*x + e)/f^3 + 3*(f*x + e)^2*a*b*h^3*p*q*e^
2*log(f*x + e)/f^4 - 6*(f*x + e)*b^2*g*h^2*p*q*e^2*log(c)/f^3 - 3/2*(f*x + e)^2*b^2*h^3*p*q*e^2*log(c)/f^4 - 2
*(f*x + e)*b^2*h^3*p*q*e^3*log(f*x + e)*log(c)/f^4 + (f*x + e)*b^2*g^3*log(c)^2/f + 3/2*(f*x + e)^2*b^2*g^2*h*
log(c)^2/f^2 + (f*x + e)^3*b^2*g*h^2*log(c)^2/f^3 + 1/4*(f*x + e)^4*b^2*h^3*log(c)^2/f^4 - 3*(f*x + e)*b^2*g^2
*h*e*log(c)^2/f^2 - 3*(f*x + e)^2*b^2*g*h^2*e*log(c)^2/f^3 - (f*x + e)^3*b^2*h^3*e*log(c)^2/f^4 + 2*(f*x + e)*
a*b*g^3*q*log(d)/f + 3*(f*x + e)^2*a*b*g^2*h*q*log(d)/f^2 + 2*(f*x + e)^3*a*b*g*h^2*q*log(d)/f^3 + 1/2*(f*x +
e)^4*a*b*h^3*q*log(d)/f^4 + 2*(f*x + e)*b^2*h^3*p*q^2*e^3*log(d)/f^4 - 6*(f*x + e)*a*b*g^2*h*q*e*log(d)/f^2 -
6*(f*x + e)^2*a*b*g*h^2*q*e*log(d)/f^3 - 2*(f*x + e)^3*a*b*h^3*q*e*log(d)/f^4 + 6*(f*x + e)*b^2*g*h^2*q*e^2*lo
g(c)*log(d)/f^3 + 3*(f*x + e)^2*b^2*h^3*q*e^2*log(c)*log(d)/f^4 - (f*x + e)*b^2*h^3*q^2*e^3*log(d)^2/f^4 - 6*(
f*x + e)*a*b*g*h^2*p*q*e^2/f^3 - 3/2*(f*x + e)^2*a*b*h^3*p*q*e^2/f^4 - 2*(f*x + e)*a*b*h^3*p*q*e^3*log(f*x + e
)/f^4 + 2*(f*x + e)*a*b*g^3*log(c)/f + 3*(f*x + e)^2*a*b*g^2*h*log(c)/f^2 + 2*(f*x + e)^3*a*b*g*h^2*log(c)/f^3
 + 1/2*(f*x + e)^4*a*b*h^3*log(c)/f^4 + 2*(f*x + e)*b^2*h^3*p*q*e^3*log(c)/f^4 - 6*(f*x + e)*a*b*g^2*h*e*log(c
)/f^2 - 6*(f*x + e)^2*a*b*g*h^2*e*log(c)/f^3 - 2*(f*x + e)^3*a*b*h^3*e*log(c)/f^4 + 3*(f*x + e)*b^2*g*h^2*e^2*
log(c)^2/f^3 + 3/2*(f*x + e)^2*b^2*h^3*e^2*log(c)^2/f^4 + 6*(f*x + e)*a*b*g*h^2*q*e^2*log(d)/f^3 + 3*(f*x + e)
^2*a*b*h^3*q*e^2*log(d)/f^4 - 2*(f*x + e)*b^2*h^3*q*e^3*log(c)*log(d)/f^4 + (f*x + e)*a^2*g^3/f + 3/2*(f*x + e
)^2*a^2*g^2*h/f^2 + (f*x + e)^3*a^2*g*h^2/f^3 + 1/4*(f*x + e)^4*a^2*h^3/f^4 + 2*(f*x + e)*a*b*h^3*p*q*e^3/f^4
- 3*(f*x + e)*a^2*g^2*h*e/f^2 - 3*(f*x + e)^2*a^2*g*h^2*e/f^3 - (f*x + e)^3*a^2*h^3*e/f^4 + 6*(f*x + e)*a*b*g*
h^2*e^2*log(c)/f^3 + 3*(f*x + e)^2*a*b*h^3*e^2*log(c)/f^4 - (f*x + e)*b^2*h^3*e^3*log(c)^2/f^4 - 2*(f*x + e)*a
*b*h^3*q*e^3*log(d)/f^4 + 3*(f*x + e)*a^2*g*h^2*e^2/f^3 + 3/2*(f*x + e)^2*a^2*h^3*e^2/f^4 - 2*(f*x + e)*a*b*h^
3*e^3*log(c)/f^4 - (f*x + e)*a^2*h^3*e^3/f^4